package String;

public class WordBook {

	public static void main(String[] args) {
		// compareTo
		/*
		 * 字典顺序在之前的为负整数
		 * 反之为正整数
		 * 相等则为0
		 *
		 * */
		
		String str = new String("b");
		String str2 = new String("a");
		String str3 = new String("c");
		System.out.println(str+" compareTo "+str2+":"+str.compareTo(str2));
		System.out.println(str+" compareTo "+str3+":"+str.compareTo(str3));

	}

}
